{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=3059
  Verdict: Accepted
}
uses SysUtils, Math;
 
const
	eps:double=1e-6;
 
var
	i,n:longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
i:=1;
while i<=n do begin
	write(i,' ');
	i:=i*2;
end;
end.